import { createSlice } from '@reduxjs/toolkit'
import dayjs from 'dayjs'


export const counterSlice = createSlice({
    name: 'counter',
    initialState: {
        stret: '杭州',
        end: '厦门',
       date:dayjs().format('YYYY-MM-DD'),
    },
    reducers: {
        upzhuui(state) {
            const timer = state.stret
            state.stret = state.end
            state.end=timer
       }
    },
})


export const { upzhuui } = counterSlice.actions

export default counterSlice.reducer